#include"searcher.hpp"
#include<cstdio>
#include<iostream>
#include<ctring>
#include<string>

const std::string input = "data/raw_html/raw.txt";
#define MAX 1024


int main(int argc, char** argv)
{
    //for test
    ns_searcher::Searcher* search = new ns_searcher::Searcher();
    search->InitSearcher(input);

    std::string query;
    std::string json_string;
    char buffer[MAX];
    while(true)
    {
            std::cout << "Please Enter You Search Query#" ;
            // std::cin >> query;
            // search->InitSearcher(query, &json_string);
            if(fgets(buffer, sizeof(buffer) - 1, stdin))
            {
                buffer[strlen(buffer) - 1] = '\0';
                query = buffer;
            }
            
            std::cout << json_string << std::emdl;
    }
    return 0;
}